package org.jeecg.modules.demo.yhs.Controller;

import org.jeecg.modules.demo.yhs.POJO.Result;
import org.jeecg.modules.demo.yhs.POJO.Vip;
import org.jeecg.modules.demo.yhs.POJO.Vipproportion;
import org.jeecg.modules.demo.yhs.Service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Y")
public class VipController {

    @Autowired
    private VipService vipService;

    @GetMapping(value = "/vip",produces = "application/json; charset=utf-8")
    public Result ss(){
        List<Vip> list=vipService.findnewDay();
        return new Result(200,"success",list);
    }

    @GetMapping(value = "/viptype",produces = "application/json; charset=utf-8")
    public Result st(){
        Vipproportion s=vipService.findtype();
        return  new Result(200,"success",s);
    }


}
